$OpenBSD: patch-configure_ac,v 1.16 2017/02/02 12:04:43 danj Exp $
--- configure.ac.orig	Sun Nov  6 07:01:27 2016
+++ configure.ac	Thu Feb  2 06:50:26 2017
@@ -156,7 +156,7 @@ AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
 
 if test "$GCC" = "yes"
 then
-	CFLAGS="$CFLAGS -Wno-unused-function"
+	CFLAGS="$CFLAGS -Wall"
 	#CFLAGS="-g -Wall -Wno-unused-function"
 fi
 
@@ -497,6 +497,8 @@ dnl password encryption
 OLDLIBS=$LIBS
 LIBS=
 case $host_os in
+	*openbsd*)
+	;;
 	*dragonfly*)
 		AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
 	;;
@@ -781,6 +783,7 @@ if test x"$enable_alternate_addressbook" = xno; then
 		AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
 		AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
 		AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
+		AC_CHECK_LIB(sasl2, sasl_version, LDAP_LIBS="$LDAP_LIBS -lsasl2")
 		AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
 				 $LDAP_LIBS)
 
@@ -853,7 +856,7 @@ if test x"$enable_alternate_addressbook" = xno; then
 					   AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
 		fi
 
-		AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" enable_jpilot="no"])
+		AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock -pthread"], [JPILOT_LIBS="" enable_jpilot="no"], -pthread)
 		if test x"$enable_jpilot" = xyes; then
 			AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
 		else
